#ifndef WIDGET_H
#define WIDGET_H

#include <QWidget>
#include <QTimer>  //定时器
#include "my_thread.h"  //线程
#include <QThread>

QT_BEGIN_NAMESPACE
namespace Ui { class Widget; }
QT_END_NAMESPACE

class Widget : public QWidget
{
    Q_OBJECT

public:
    Widget(QWidget *parent = nullptr);
    ~Widget();
    int ms=0;
    void dealsignal();
    void dealclose();

signals:
    //启动子线程的信号
    void startThreadSignal();

private:
    Ui::Widget *ui;
    QTimer *timer = NULL;
    My_Thread *mythread = NULL;
    QThread *thread = NULL;


private slots:
    void numcheck(int cnum, int max, int *buf);

    void on_pushButton_start_clicked();

    void on_pushButton_stop_clicked();
};
#endif // WIDGET_H
